<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>1~100之间的所有能被3整除的整数之和</title>
    <script>
        var result = 0;
        for( var i =1; i <= 100; i++){
            if(i % 3 == 0 ){
                result += i;
            }
        }
        console.log(result); //1683
    </script>
</head>
<body>

</body>
</html>